package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.service.IGymCoachService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GymCoachMapper;
import com.ruoyi.system.domain.GymCoach;
import com.ruoyi.common.core.text.Convert;

/**
 * 教练Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-22
 */
@Service
public class GymCoachServiceImpl implements IGymCoachService
{
    @Autowired
    private GymCoachMapper gymCoachMapper;

    /**
     * 查询教练
     * 
     * @param coachId 教练主键
     * @return 教练
     */
    @Override
    public GymCoach selectGymCoachByCoachId(Long coachId)
    {
        return gymCoachMapper.selectGymCoachByCoachId(coachId);
    }

    /**
     * 查询教练列表
     * 
     * @param gymCoach 教练
     * @return 教练
     */
    @Override
    public List<GymCoach> selectGymCoachList(GymCoach gymCoach)
    {
        return gymCoachMapper.selectGymCoachList(gymCoach);
    }

    /**
     * 新增教练
     * 
     * @param gymCoach 教练
     * @return 结果
     */
    @Override
    public int insertGymCoach(GymCoach gymCoach)
    {
        return gymCoachMapper.insertGymCoach(gymCoach);
    }

    /**
     * 修改教练
     * 
     * @param gymCoach 教练
     * @return 结果
     */
    @Override
    public int updateGymCoach(GymCoach gymCoach)
    {
        return gymCoachMapper.updateGymCoach(gymCoach);
    }

    /**
     * 批量删除教练
     * 
     * @param coachIds 需要删除的教练主键
     * @return 结果
     */
    @Override
    public int deleteGymCoachByCoachIds(String coachIds)
    {
        return gymCoachMapper.deleteGymCoachByCoachIds(Convert.toStrArray(coachIds));
    }

    /**
     * 删除教练信息
     * 
     * @param coachId 教练主键
     * @return 结果
     */
    @Override
    public int deleteGymCoachByCoachId(Long coachId)
    {
        return gymCoachMapper.deleteGymCoachByCoachId(coachId);
    }

    @Override
    public List<GymCoach> selectGymCoachAll() {
        return gymCoachMapper.selectGymCoachAll();
    }
}
